<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        var person=new Object();
        person.name="Zhangsan";
        person.age=19;
        person.showname=function (){return this.name;};
        person.showage=function (){return this.age;};
        document.write('直接引用person对象的name属性值是：'+person.name+"<br>");
        document.write('直接引用person对象的age属性值是：'+person.age+"<br>");
        document.write('通过方法返回person对象的name属性值是：'+person.showname()+"<br>");
        document.write('通过方法返回person对象的age属性值是：'+person.showage()+"<br>");
   </script> 
</body>
</html>